package com.example.converter.config;

import com.example.converter.enums.VideoTypeEnum;
import org.springframework.core.convert.converter.Converter;
import org.springframework.stereotype.Component;

@Component
public class StringToEnumConverter2 implements Converter<String, VideoTypeEnum> {

    @Override
    public VideoTypeEnum convert(String source) {
        return VideoTypeEnum.getEnumById(Integer.parseInt(source));
    }
}
